home *** CD-ROM | disk | FTP | other *** search
/ Risc World 5 / Risc World 5.iso / SOFTWARE / Issue3 / Games / xrick / !xrick / src / c / e_bonus < prev    next >
Text File  |  2004-06-24  |  1KB  |  61 lines

  1. /*
  2.  * xrick/src/e_bonus.c
  3.  *
  4.  * Copyright (C) 1998-2002 BigOrno (bigorno@bigorno.net). All rights reserved.
  5.  *
  6.  * The use and distribution terms for this software are contained in the file
  7.  * named README, which can be found in the root of this distribution. By
  8.  * using this software in any fashion, you are agreeing to be bound by the
  9.  * terms of this license.
  10.  *
  11.  * You must not remove this notice, or any other, from this software.
  12.  */
  13.  
  14. #include "system.h"
  15. #include "game.h"
  16. #include "ents.h"
  17. #include "e_bonus.h"
  18.  
  19. #include "e_rick.h"
  20. #include "maps.h"
  21.  
  22.  
  23. /*
  24.  * Entity action
  25.  *
  26.  * ASM 242C
  27.  */
  28. void
  29. e_bonus_action(U8 e)
  30. {
  31. #define seq c1
  32.  
  33.   if (ent_ents[e].seq == 0) {
  34.     if (e_rick_boxtest(e)) {
  35.       game_score += 500;
  36. #ifdef ENABLE_SOUND
  37.       syssnd_play(WAV_BONUS, 1);
  38. #endif
  39.       map_marks[ent_ents[e].mark].ent |= MAP_MARK_NACT;
  40.       ent_ents[e].seq = 1;
  41.       ent_ents[e].sprite = 0xad;
  42.       ent_ents[e].front = TRUE;
  43.       ent_ents[e].y -= 0x08;
  44.     }
  45.   }
  46.  
  47.   else if (ent_ents[e].seq > 0 && ent_ents[e].seq < 10) {
  48.     ent_ents[e].seq++;
  49.     ent_ents[e].y -= 2;
  50.   }
  51.  
  52.   else {
  53.     ent_ents[e].n = 0;
  54.   }
  55. }
  56.  
  57.  
  58. /* eof */
  59.  
  60.  
  61.